<template>
  <div class="loading">
    <img v-if="isPC" class="img-pc" src="https://fuwuhao.chinalife-p.com.cn/carInsureGstAPP/images/loading.gif" alt="">
    <img v-if="!isPC" class="img-mobile" src="https://fuwuhao.chinalife-p.com.cn/carInsureGstAPP/images/loading.gif" alt="">
  </div>
</template>

<script>
import { isPC } from '@/utils/validate';

export default {
  name: 'LOADING',
  data() {
    return {
      isPC: false,
    };
  },
  created() {
    if (isPC()) {
      this.isPC = true;
    }
  },
};
</script>
<style lang="less" scoped>
  .loading{
    position: fixed;
    top:0;
    left:0;
    z-index:1000;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    .img-pc{
      width: 5vw;
      height: 5vw;
      margin:21vw auto;
    }
    .img-mobile{
      width: 50px;
      height: 50px;
      margin: 300px auto;
    }
  }
</style>
